using Microsoft.Win32;

namespace 雷赛板卡上位机.Utilities;

public static class OpenFileDialogEx
{
    public static string? OpenFileDialog(string filter)
    {
        var openFileDialog = App.GetService<OpenFileDialog>();
        openFileDialog.Filter = filter;
        openFileDialog.CheckFileExists = false;
        var ret = openFileDialog.ShowDialog();
        return ret.Value ? openFileDialog.FileName : null;
    }
}